Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Using the Error Manager

For each level of exceptional condition (that is, for errors, warnings, and notices), QuickDraw 3D keeps track of the first and the most recent exceptional conditions that have occurred since the last time an exceptional condition of that type was posted. For example, when the first error occurs, that error is posted both as the first and as the most recent error. Any subsequent error is posted as the most recent error to occur.

When you call a _Get function to retrieve an error, warning, or notice, the function returns, as its function result, the most recent error, warning, or notice. For example, when you call Q3Error_Get , it returns, as its function result, the most recent error. Q3Error_Get also returns, through its firstError parameter, the oldest unreported error that occurred during a QuickDraw 3D routine. You can set this parameter to NULL if you do not care about the oldest unreported error.

The oldest unreported error, warning, or notice is sometimes called sticky .

Once you've called the Q3Error_Get function to retrieve the most recent and the oldest unreported QuickDraw 3D errors, the Error Manager automatically clears those error codes the next time you call a QuickDraw 3D function that is not part of the Error Manager.

If an error occurs in the operating system on which QuickDraw 3D is running, the Error Manager posts an error indicating which the operating system encountered the error. You can then call an appropriate function to retrieve the system-specific error. For instance, if an error occurs while reading or writing a file in the Macintosh Operating System, then the Q3Error_Get function returns the error kQ3ErrorMacintoshError . In that case, you can call the Q3MacintoshError_Get function to get the Macintosh-specific error code.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |